#import "DongTaiDetailViewController.h"

#import "DongTaiDetailBaseCell.h"
#import "DongTaiDetailCommentCell.h"

@interface DongTaiDetailViewController ()

@end

@implementation DongTaiDetailViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.title = @"动态详情";
}
- (IBAction)backAction:(id)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
}



#pragma mark - table


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 2;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (indexPath.row==0) {
        return 280;
    }
    else{
        return 85;
    }
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (indexPath.row==0) {
         DongTaiDetailBaseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"DongTaiDetailBaseCell" forIndexPath:indexPath];
        return cell;
    }
    else{
        DongTaiDetailCommentCell *cell = [tableView dequeueReusableCellWithIdentifier:@"DongTaiDetailCommentCell" forIndexPath:indexPath];
        return cell;
    }
}



- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    
}


@end
